package com.xiaoge.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoge.system.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoge.system.entity.UserRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author xiaoge
 * @since 2021-02-02
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    IPage<User> findUserPage(Page page,
                             @Param(Constants.WRAPPER) QueryWrapper<User> wrapper,
                             @Param("roleId") Long roleId);

    List<User> getAllUser();
}
